﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;
using BrokerBase.Lib.Product;
using BrokerBase.Lib.Product.RateFactorConverter;
using BrokerBase.Lib.Tool;

namespace BrokerBase.Lib.Product
{
    public class ProductExpander : AbstractProductExpander
    {
        /// <summary>
        /// 保单加载完成
        /// </summary>
        /// <param name="policy"></param>
        public override void Loaded(IPolicy policy)
        {


            IPaymentPeriod bpp = policy.Owner.BasicPolicy.SelectedPaymentPeriod;

            policy.SelectedInsurancePeriod = policy.Product.InsurancePeriods.First(p => p.Style == bip.Style && p.Value == bip.Value);

            policy.SetSettingLock("缴费期限", true);

        }


    }
}